package serverTest;

import com.tasks.server.*;
import com.tasks.table.User;
import com.tasks.tablemodel.Tasks;

public class ServerTest {
	private static Server server;

	public static void main(String[] args) {
		
		server = new Server(Settings.load("../properties/SQLite.settings"));
		
		//User user = new User("michael", "passwd", "Michael", "Piskuric", "michael@piskuric.ca");
		User user = User.fetchById(server, 4); 
		System.out.println(user.toString());
		//user.save(server);		
			
		//Task task = new Task(user, Priority.Low, Location.Work);
		//Task task = Task.fetchById(server, 3);
		
		//System.out.println(task.toString());
		//task.save(server);
		//task.set("pRiorIty", Priority.Medium);
		//task.set("location", Location.Out);
		//task.save(server);
				
		//System.out.println(task.toString());
		
		Tasks tasks = new Tasks();
		tasks.fetchByUser(server, user);
		
		System.out.println(tasks.toString());
		
		server.close();
	}
}
